package my.diplom.dao.impl;

import org.apache.log4j.Logger;
import org.springframework.orm.hibernate3.HibernateTemplate;
import my.diplom.entity.Event;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: gb
 * Date: 14.07.2009
 * Time: 15:31:08
 * To change this template use File | Settings | File Templates.
 */
public class AbstractDAOImpl<T> {


    private HibernateTemplate template;

    public void setTemplate(HibernateTemplate template) {
        this.template = template;
    }

    public void create(T entity) {
        template.save(entity);
    }


    public void update(T entity) {
        template.saveOrUpdate(entity);
    }


    public void delete(T entity) {
        template.delete(entity);
    }

    public T getById(Long id){
       return null;
    }

    public List<T> getAll(String order){
        return null;
    }


}
